<%@ page language="java" import="java.util.*" contentType="text/html"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" import="com.server.web.JsVersionUtil"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${projectName}</title>
<script type="text/javascript"
	src='<c:url value="/js/boot.js"></c:url>?v=<%=JsVersionUtil.CURRENT_VERSION%>'></script>
<script type="text/javascript"
	src='<c:url value="/js/chart/chartCreate.js"></c:url>?v=<%=JsVersionUtil.CURRENT_VERSION%>'></script>
<link rel="stylesheet" type="text/css"
	href='<c:url value="/share/styles.css"></c:url>?v=<%=JsVersionUtil.CURRENT_VERSION%>' />
<style type="text/css">
body, html {
	width: 100%;
	height: 100%;
	margin: 0;
	font-family: "微软雅黑";
}

p {
	margin-left: 5px;
	font-size: 14px;
}

body {
	height: 100%;
	overflow: hidden;
}

.filterPan td {
	padding: 0;
}

.mini-splitter-pane {
	overflow: auto;
}

.mini-panel-body {
	padding: 0;
}

html body .searchbox .mini-buttonedit-icon {
	background: url('<c:url value="/share/img/magnifier-zoom.png"></c:url>')
		no-repeat 5% 5%;
}

.nameTitle {
	color: red;
}

.cellclass {
	font-color: #000000;
	background-color: #FFEBE6;
	color: red;
}

.deepDark {
	background-color: #CCC488;
}

.normalDark {
	background-color: #FFF7BB;
}

.lowDark {
	
}

.pieTable {
	width: 1200px;
	border-spacing: 10px;
}

.pieTable td {
	width: 100%;
	background-color: #f0f0f0;
	text-align: center;
}
.summaryStyle {
	color: red;
	text-align: right;
	font-weight: bolder;
}
</style>
<script>
	var stateData = [ {
		id : "0",
		text : "暂无招聘"
	}, {
		id : "1",
		text : "正在招聘"
	} ];
</script>

</head>

<body>
	<div id="datagrid1" class="mini-datagrid gridFull"
		borderStyle="border:1;" showReloadButton="true" pagesize="20"
		sizeList="[20,50,100,200]" allowCellWrap="true" allowHeaderWrap="true"
		idField="No" multiSelect="true" showPager="true"
		allowAlternating="true" ondrawcell="ondatagridDrawCell"
		onrowdblclick=""
		style="height: 100%; width: 100%; -moz-user-select: none; -webkit-user-select: none;"
		collapseGroupOnLoad="false" showColumnsMenu="true"
		showFilterRow="false" onshowrowdetail="onShowRowDetail" 
		ondrawsummarycell="onDrawSummaryCell" showSummaryRow="true"
		showFilterRow="false" onshowrowdetail="onShowRowDetail">
		<div property="columns">
			<div type="indexcolumn" width="40px"></div>
			<!-- <div type="checkcolumn" width="40px" align="center"></div>
					<div field="Action" width="70px" headerAlign="center"
						align="center">
						<a class="mini-button" property="filter" id="removeBtn"
							iconCls="icon-broom" tooltip="清除筛选" onclick="removeSearch()">清除
						</a>
					</div> -->
			<div field="CardID" width="200px" headerAlign="center" align="left"
				allowSort="true">
				身份证号
			</div>
			<div field="UserName" width="80px" headerAlign="center" align="left"
				allowSort="true">
				姓名
			</div>
			<div field="Amount" width="160px" headerAlign="center" align="right"
				allowSort="true" summaryType="sum" dataType="currency">返费总额(元)</div>
			<div field="Amount1" width="80px" headerAlign="center" align="right"
				allowSort="true" summaryType="sum" dataType="currency">一级返费(元)</div>
			<div field="Amount2" width="80px" headerAlign="center" align="right"
				allowSort="true" summaryType="sum" dataType="currency">二级返费(元)</div>
			<div field="Amount3" width="80px" headerAlign="center" align="right"
				allowSort="true" summaryType="sum" dataType="currency">三级返费(元)</div>
			<div field="Amount4" width="80px" headerAlign="center" align="right"
				allowSort="true" summaryType="sum" dataType="currency">四级返费(元)</div>
			<div field="CreateTime" width="185px" dateFormat="yyyy-MM-dd HH:mm"
				headerAlign="center" align="center" allowSort="true">计算时间</div>
			<div field="Note" width="100%" headerAlign="center" align="left">
				详细
			</div>
			<!-- <div name="emptyCol" width='100%' headerAlign="center" align="center"
				cellStyle="padding:0;"></div> -->
		</div>
	</div>
	<script type="text/javascript">
		mini.parse();
		mini_debugger = false;
		var isKeepStat3 = false;
		var rootPath = '${rootPath}';
		var id = '${id}';
		var filterHelper = gridFilter();

		var datagrid1 = mini.get("datagrid1");


		$(function() {
			loadGrid1();
		});
		function onselect() {
			var filterValue1 = filter1.getValue();
			var filterValue2 = filter2.getValue();
			var filterValue3 = filter3.getValue();
			filterHelper.clearFilterData();
			if (filterValue1 != "") {
				var filterdata = filterHelper.formFilterData("OrgNo",
						filterValue1, '', 'CONTAIN', 'AND');
				filterHelper.addFilterData(filterdata);
			}
			if (filterValue2 != "") {
				var filterdata = filterHelper.formFilterData("OrgName",
						filterValue2, '', 'CONTAIN', 'AND');
				filterHelper.addFilterData(filterdata);
			}
			if (filterValue3 != "") {
				var filterdata = filterHelper.formFilterData("EmployState",
						filterValue3, '', 'EQUALS', 'AND');
				filterHelper.addFilterData(filterdata);
			}
			loadGrid1();
		}
		function loadGrid1() {
			/* var filterData = filterHelper.getFilterData();
			var postData = new Object();
			if (filterData != null || filterData.length > 0) {
				postData.filterdata = mini.encode(filterData);
			} */
			var url = "<c:url value='/finance/detailList/' />" + id;
			datagrid1.load(url);
			datagrid1.load();
		}
		function removeSearch() {
			filter1.setValue();
			filter1.setText();
			filter2.setValue();
			filter2.setText();
			filter3.setValue();
			filterHelper.clearFilterData();
			loadGrid1();
		}

		function ondatagridDrawCell(e) {
			var field = e.field;
			var row = e.row;
		}
		function onDrawSummaryCell(e) {
			e.cellCls = "summaryStyle";
			var field = e.field;
			/* if (field == "Amount"||field == "Amount1"||field == "Amount2"
				||field == "Amount3"||field == "Amount4") {
				e.cellHtml = e.cellHtml.toFixed(2);
			} */
		}
	</script>
</body>
</html>